package com.xp.pgoj.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xp.pgoj.model.dto.comment.CommentQueryRequest;
import com.xp.pgoj.model.dto.post.PostQueryRequest;
import com.xp.pgoj.model.entity.Comment;
import com.xp.pgoj.model.entity.Post;
import com.xp.pgoj.model.vo.CommentVO;
import com.xp.pgoj.model.vo.PostVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
* @author xiaogeer
* @description 针对表【comment(评论表
)】的数据库操作Service
* @createDate 2024-09-25 15:16:02
*/
public interface CommentService extends IService<Comment> {

    QueryWrapper<Comment> getQueryWrapper(CommentQueryRequest commentQueryRequest);

    Page<CommentVO> getCommentVOPage(Page<Comment> commentPage, HttpServletRequest request);

    List<CommentVO> getCommentVOList(List<Comment> commentList, HttpServletRequest request);

    List<Comment> getCommentListByQuestionId(Long questionId);

    boolean addComment(Comment comment, HttpServletRequest request);
}
